import React from "react";
// 使用 React.memo 检查 props 变更，复用最近一次渲染结果
SubmitButton = React.memo(SubmitButton);

export default function SubmitButton(props) {
  const { onButtonClick, children } = props;
  console.log(`${children} updated`);

  return (
    <button onClick={onButtonClick}>{children}</button>
  );
}
